package base.system.io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;

public class Client {
    public static void main(String[] args) throws FileNotFoundException {
        // 将System.out写入文件中

        OutputStream output = new FileOutputStream("C:\\Temp\\test\\log.log");
        PrintStream printStream = new PrintStream(output);

        System.setOut(printStream);

        for (int i = 0; i < 10; i++) {
            System.out.println("[DEBUG]" + i);

        }


    }
}
